home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-11 | 6.2 KB | 183 lines | [TEXT/MPS ] |
- {
- File: ControlStrip.p
-
- Copyright: © 1984-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- }
-
- {$IFC UNDEFINED UsingIncludes}
- {$SETC UsingIncludes := 0}
- {$ENDC}
-
- {$IFC NOT UsingIncludes}
- UNIT ControlStrip;
- INTERFACE
- {$ENDC}
-
- {$IFC UNDEFINED __CONTROLSTRIP__}
- {$SETC __CONTROLSTRIP__ := 1}
-
- {$I+}
- {$SETC ControlStripIncludes := UsingIncludes}
- {$SETC UsingIncludes := 1}
-
-
- {$IFC UNDEFINED __TYPES__}
- {$I Types.p}
- {$ENDC}
- { ConditionalMacros.p }
-
- {$IFC UNDEFINED __MENUS__}
- {$I Menus.p}
- {$ENDC}
- { Memory.p }
- { MixedMode.p }
- { Quickdraw.p }
- { QuickdrawText.p }
- { Events.p }
- { OSUtils.p }
-
- {$IFC UNDEFINED __DIALOGS__}
- {$I Dialogs.p}
- {$ENDC}
- { Errors.p }
- { Windows.p }
- { Controls.p }
- { TextEdit.p }
-
- {$PUSH}
- {$ALIGN MAC68K}
- {$LibExport+}
-
- CONST
- sdevInitModule = 0; { initialize the module}
- sdevCloseModule = 1; { clean up before being closed}
- sdevFeatures = 2; { return feature bits}
- sdevGetDisplayWidth = 3; { returns the width of the module's display}
- sdevPeriodicTickle = 4; { periodic tickle when nothing else is happening}
- sdevDrawStatus = 5; { update the interface in the Control Strip}
- sdevMouseClick = 6; { user clicked on the module's display area in the Control Strip}
- sdevSaveSettings = 7; { saved any changed settings in module's preferences file}
- sdevShowBalloonHelp = 8; { puts up a help balloon, if the module has one to display}
-
- {********************************************************************************************
-
- Features supported by the module. If a bit is set, it means that feature is supported.
- All undefined bits are reserved for future use by Apple, and should be set to zero.
-
- ********************************************************************************************}
- sdevWantMouseClicks = 0; { notify the module of mouseDown events}
- sdevDontAutoTrack = 1; { call the module to do mouse tracking}
- sdevHasCustomHelp = 2; { module provides its own help messages}
- sdevKeepModuleLocked = 3; { module needs to be locked in the heap}
-
- {********************************************************************************************
-
- Result values returned by the sdevPeriodicTickle and sdevIconMouseClick selectors.
- If a bit is set, the module can request that a specific function is performed by
- the Control Strip. A result of zero will do nothing. All undefined bits are reserved
- for future use by Apple, and should be set to zero.
-
- ********************************************************************************************}
- sdevResizeDisplay = 0; { resize the module's display}
- sdevNeedToSave = 1; { need to save changed settings, when convenient}
- sdevHelpStateChange = 2; { need to update the help message because of a state change}
- sdevCloseNow = 3; { close a module because it doesn't want to stay around}
-
- {********************************************************************************************
-
- miscellaneous
-
- ********************************************************************************************}
- sdevFileType = 'sdev';
-
- sdevMenuItemMark = '•';
-
- { direction values for SBDrawBarGraph}
- BarGraphSlopeLeft = -1; { max end of sloping bar graph is on the left}
- BarGraphFlatRight = 0; { max end of flat bar graph is on the right}
- BarGraphSlopeRight = 1; { max end of sloping bar graph is on the right}
-
- {********************************************************************************************
-
- utility routines to provide standard interface elements and support for common functions
-
- ********************************************************************************************}
-
- FUNCTION SBIsControlStripVisible: BOOLEAN;
- {$IFC NOT GENERATINGCFM}
- INLINE $7000, $AAF2;
- {$ENDC}
- PROCEDURE SBShowHideControlStrip(showIt: BOOLEAN);
- {$IFC NOT GENERATINGCFM}
- INLINE $303C, $0101, $AAF2;
- {$ENDC}
- FUNCTION SBSafeToAccessStartupDisk: BOOLEAN;
- {$IFC NOT GENERATINGCFM}
- INLINE $7002, $AAF2;
- {$ENDC}
- FUNCTION SBOpenModuleResourceFile(fileCreator: OSType): INTEGER;
- {$IFC NOT GENERATINGCFM}
- INLINE $303C, $0203, $AAF2;
- {$ENDC}
- FUNCTION SBLoadPreferences(prefsResourceName: ConstStr255Param; VAR preferences: Handle): OSErr;
- {$IFC NOT GENERATINGCFM}
- INLINE $303C, $0404, $AAF2;
- {$ENDC}
- FUNCTION SBSavePreferences(prefsResourceName: ConstStr255Param; preferences: Handle): OSErr;
- {$IFC NOT GENERATINGCFM}
- INLINE $303C, $0405, $AAF2;
- {$ENDC}
- PROCEDURE SBGetDetachedIndString(theString: StringPtr; stringList: Handle; whichString: INTEGER);
- {$IFC NOT GENERATINGCFM}
- INLINE $303C, $0506, $AAF2;
- {$ENDC}
- FUNCTION SBGetDetachIconSuite(VAR theIconSuite: Handle; theResID: INTEGER; selector: LONGINT): OSErr;
- {$IFC NOT GENERATINGCFM}
- INLINE $303C, $0507, $AAF2;
- {$ENDC}
- FUNCTION SBTrackPopupMenu({CONST}VAR moduleRect: Rect; theMenu: MenuHandle): OSErr;
- {$IFC NOT GENERATINGCFM}
- INLINE $303C, $0408, $AAF2;
- {$ENDC}
- FUNCTION SBTrackSlider({CONST}VAR moduleRect: Rect; ticksOnSlider: INTEGER; initialValue: INTEGER): OSErr;
- {$IFC NOT GENERATINGCFM}
- INLINE $303C, $0409, $AAF2;
- {$ENDC}
- FUNCTION SBShowHelpString({CONST}VAR moduleRect: Rect; helpString: StringPtr): OSErr;
- {$IFC NOT GENERATINGCFM}
- INLINE $303C, $040A, $AAF2;
- {$ENDC}
- FUNCTION SBGetBarGraphWidth(barCount: INTEGER): INTEGER;
- {$IFC NOT GENERATINGCFM}
- INLINE $303C, $010B, $AAF2;
- {$ENDC}
- PROCEDURE SBDrawBarGraph(level: INTEGER; barCount: INTEGER; direction: INTEGER; barGraphTopLeft: Point);
- {$IFC NOT GENERATINGCFM}
- INLINE $303C, $050C, $AAF2;
- {$ENDC}
- PROCEDURE SBModalDialogInContext(filterProc: ModalFilterUPP; VAR itemHit: INTEGER);
- {$IFC NOT GENERATINGCFM}
- INLINE $303C, $040D, $AAF2;
- {$ENDC}
-
- {$ALIGN RESET}
- {$POP}
-
- {$SETC UsingIncludes := ControlStripIncludes}
-
- {$ENDC} {__CONTROLSTRIP__}
-
- {$IFC NOT UsingIncludes}
- END.
- {$ENDC}
-